package org.rcloud.io.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by Administrator on 2019/2/18.
 */
@Controller
public class IndexController {
    @RequestMapping(value = "/",method = RequestMethod.GET)
    public String toindex(){
        return "/index";
    }

    /*@RequestMapping(value = "/xxx",method = RequestMethod.GET)
    public String xxx(){
        return "/Endorsementinfo.html";
    }*/

    /*@RequestMapping(value = "/xxx", produces = {"application/json;charset=UTF-8"})
    public String toindex(@RequestBody String params){

         String cookie = JSON.parseObject(params).getString("cookie");
         System.out.println(cookie);
         if(cookie != ""){
             return "/Endorsementinfo.html";
         }else {
             return "https://wdsx.fywljt.cn/starter-tomcat-1.0/admin/login";
         }
        //return "/Endorsementinfo.html";
    }*/
}
